/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */

package cn.hermit.reflection.parameter;

import java.lang.reflect.AccessibleObject;

/**
 * @author JackGao 高建国
 * @description //TODO 设计说明
 * @date 1/6/2017
 */
public class NullParameterNameFinder implements ParameterNameFinder  {

    public String[] findParameterNames(AccessibleObject methodOrConstructor) {
        return new String[0];
    }

    public String[] findParameterNames(AccessibleObject methodOrConstructor, boolean throwExceptionIfMissing) {
        if (throwExceptionIfMissing) {
            throw new ParameterNamesNotFoundException("NullParameterNameFinder implementation predictably finds no parameter names");
        }
        return EMPTY_NAMES;
    }
}
